package handlers

import (
	"net/http"

	"gitee.com/lorock/goconfig"
	"github.com/gin-gonic/gin"
)

func Ping(c *gin.Context) {
	c.String(http.StatusOK, "pong")
}

func Hello(c *gin.Context) {
	c.JSON(http.StatusOK, gin.H{
		"message": "Hello www.xubaojin.com !",
	})
}

func Version(c *gin.Context) {
	c.JSON(http.StatusOK, gin.H{
		"message": goconfig.GetString("APP_VERSION"),
	})
}
